package com.edu.controller;

import com.edu.mapper.AStudentMapper;
import com.edu.pojo.Student;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @作者 five-five
 * @创建时间 2021/1/19
 */
@Controller
@ResponseBody
@Api(tags = "服务端学生接口")
public class StudentController {
    @Resource
    private AStudentMapper aStudentMapper;

    @ApiOperation(notes = "获取所有学生", value = "获取所有学生")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public List<Student> list() {
        return aStudentMapper.selectByExample(null);
    }
}
